home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / programs / database / powerbase / docs / Create < prev    next >
Encoding:
Text File  |  1997-02-21  |  28.7 KB  |  576 lines

  1.                 CH 4 − CREATING A NEW DATABASE
  2.                 ==============================
  3. Five steps are involved in setting up a new database:−
  4.  
  5. (1)     Create the database application shell.
  6. (2)     Design the record screen
  7. (3)     Specify the number of records the database is to contain.
  8. (4)     Specify the primary key.
  9. (5)     Build the empty database.
  10.  
  11. 4.1 Creating the database application shell
  12. ===========================================
  13. You need to have Powerbase installed on the icon-bar but with no database
  14. open, i.e. “No data” should appear under the icon. Click SELECT over the
  15. icon and a Save box will appear. Type in the name of your database and drag
  16. the database icon to a directory window. Remember that the name cannot
  17. exceed 10 characters, including the initial “!”. If you enter more the name
  18. will be truncated and you could end up overwriting an existing database with
  19. a similar name. You don’t actually need to enter the “!”; Powerbase will
  20. insert it automatically.
  21.  
  22. If you open the newly-created application directory (Shift double-click) you
  23. will find that it contains files called !Run, !Sprites, !Sprites22 and Cols
  24. and four directories called Indices, PrintJobs, PrintRes and ValTables. All
  25. Powerbase applications require these objects to be present so don’t delete
  26. any of them.
  27.  
  28. 4.2 Designing the record screen
  29. ===============================
  30. When you created the application shell you were left with a blank window on
  31. screen and it is here that you must design the database record. This is the
  32. lengthiest and trickiest part of setting up a database, although efforts
  33. have been made to render it as easy as possible. If you have closed the
  34. window just click on the Powerbase icon on the icon-bar to re-open it.
  35.  
  36. 4.2.1 Simple field creation
  37. ---------------------------
  38. Clicking MENU over the window brings up the New database menu on which every
  39. item except Design field and Grid is shaded at this stage. Design field
  40. leads to a window which lets you specify the characteristics of a field.
  41. Grid allows you to choose options for the grid used to lay out the fields.
  42. This grid appears only at the design stage, not on a working database. It
  43. may be turned off but you will probably find it a great help in getting the
  44. field layout looking good.  There are options to choose the colour of the
  45. grid, whether it is represented by solid or dotted lines and what the
  46. spacing between the lines is.  By default the grid has solid, light blue
  47. lines spaced 32 OS units apart and  fields will “snap” to it at intervals of
  48. 8 OS units.  The snap interval may be altered or the snapping disabled.
  49. First decide what category of field you want to create. There are seven such
  50. categories, selected via radio buttons:−
  51.  
  52. (1) Editable, (2) Computed, (3) Check-box, (4) External, (5) Keypad button,
  53. (6) Other button, (7) Stamp
  54.  
  55. For the present we will confine ourselves to the first, which is the default
  56. selection. As well as the field category you must decide on the type of
  57. field within the category. The default offered is Unrestricted, meaning that
  58. it will accept all printable characters. We’ll look at other types later.
  59.  
  60. Decide on a name for the field and enter it in the Descriptor icon. This is
  61. the name which will appear on the record window and may be up to 40
  62. characters long. You must also enter a Tag, which is used to identify the
  63. field in search formulae and is limited to 4 characters. Next enter the Data
  64. length; the maximum number of characters the field is to hold. Values up to
  65. 246 are allowed. Now click on Create and the field will appear on the record
  66. window. It’s probably not where you want it so use SELECT to drag the white
  67. rectangle to the position required. When you drop the field in its new
  68. position you will see that the descriptor falls into place too. If you want
  69. the descriptor somewhere other than to the left of the data icon (above it,
  70. for example) you can move it by itself without the data icon moving.  A
  71. group of “bump” icons in the bottom left corner of the Create window lets
  72. you nudge the fields into position a step at a time.
  73.  
  74. That, basically, is all you need to do in order to create fields. To correct
  75. a mistake click MENU over the field to be altered and making the required
  76. changes. Then click on Update (Create will be shaded).  Data for any field
  77. may be displayed by choosing from the menu produced by clicking on List
  78. fields.
  79.  
  80. 4.2.2 Deleting, inserting and re-ordering fields.
  81. -------------------------------------------------
  82. It is important to realise the difference between the physical position of
  83. fields on the screen and the internal numbering of the fields.  The former
  84. is purely a matter of appearance and you may drag the fields about the
  85. screen to your heart’s content, but the latter is fundamental to the way the
  86. database will function.  Each field has a number which corresponds to the
  87. order in which it was created.  Whenever you invoke the Field creation
  88. window the title-bar shows either the number of the (new) field you are
  89. about to create (e.g. “New field 3”) or the number of the (existing) field
  90. you were pointing at when you opened the menu (e.g. “Modify field 5”).  The
  91. numbering of fields determines the order in which they will be “visited” by
  92. the caret when you are actually using the database, i.e. the editing order.
  93.  
  94. A field may be deleted by clicking MENU over it and clicking on Remove.
  95. Fields which come after the deleted field will be found to have had their
  96. field-numbers reduced by 1.  Inserting a field into the middle of the
  97. existing field-sequence is obviously a little more complicated because we
  98. have to specify where in the sequence the new field goes.  You need to know
  99. the number of the field before which you want to place the new one.  This
  100. number is entered in the before field icon before you click on Create. If
  101. you examine fields which come after the insertion you will find that their
  102. numbers have been increased by 1.
  103.  
  104. You can change the numbering of a field by removing it and then re-inserting
  105. it.  There is, however, a much better way.  Click MENU over an existing
  106. field to bring up the dialogue box. We will call this the “current field”.
  107. Enter the number of another existing field in the same place as was used
  108. above to specify the insertion position of a new field. We’ll call this the
  109. “entered field”. You may then do one of the following:−
  110.  
  111. •       Click Swap with. This does exactly what you would expect. It swaps
  112.         the positions of the current field and the entered field in the
  113.         field sequence.
  114.  
  115. •       Click Renumber as.  This is a bit more complicated. The current
  116.         field acquires the number of the entered field. If this involves
  117.         giving the current field a lower number than previously the fields
  118.         beyond the new position are all moved up one place to open a gap for
  119.         it, at the same time closing up the gap left by moving the current
  120.         field from its old position. If it is being given a higher number
  121.         the fields above its old position all move down one place, closing
  122.         up the gap left by its removal and opening a gap in the required
  123.         place farther up the sequence.
  124.  
  125. 4.2.3 Re-sizing the bounding box
  126. --------------------------------
  127. Left to itself Powerbase makes all its field icons the same height and of a
  128. suitable length to contain the number of characters specified in Data
  129. length. This may not be quite what you want. If the Data length is more than
  130. about 70 the field runs off the right edge of the window. You may also want
  131. to make the field taller for emphasis. (But not for displaying multiple
  132. lines. Only fields of Text block type can be multi-line. These are discussed
  133. later.) There are two ways of altering the size of a field’s bounding box:−
  134.  
  135. (a)     By dragging with ADJUST.
  136.  
  137. (b)     By typing in the required width and height in the W and H icons of
  138.         the Field creation window. The units used are the same OS units used
  139.         for plotting on the screen.  (In mode 27 the full screen is 1240 x
  140.         960 OS units.)
  141.  
  142. Besides altering the size of the bounding box by typing the data directly,
  143. you may adjust its position in the same way by entering the X and Y
  144. co-ordinates of the lower left corner. The units are the same as for width
  145. and height but the origin is the top left corner of the record window. This
  146. means that the Y values are always negative. Clicking on Fit automatically
  147. sets the bounding-box width to fit the data length.
  148.  
  149. 4.2.4 More about tags and descriptors
  150. -------------------------------------
  151. Tags are very important in Powerbase. They are used when querying the
  152. database to produce reports, export CSV files etc. and also by some internal
  153. operations. Every writable field must have a tag and no two  tags can be the
  154. same. Descriptors are less important. They are there to provide visible
  155. labels for fields and in some cases you may not need one at all. e.g. You
  156. might want the record to look like this:-
  157.  
  158.                            NAME  Fred Bloggs
  159.                         ADDRESS  17, Every Street
  160.                                  Anytown
  161.                                  Woolshire
  162.                                  WL4 7XZ
  163.  
  164. There are 5 fields here but, having given the second one the descriptor
  165. ADDRESS, you don’t really want descriptors for the remaining 3 (except
  166. perhaps POSTCODE for the last). It is quite in order to have null
  167. descriptors like this, but your must give each field a tag. Suitable ones
  168. might be NAME, ADD1, ADD2, ADD3, ADD4. (Remember they must be unique and not
  169. more than 4 characters.)
  170.  
  171. The only cases in which you may omit the tag is where the field is simply an
  172. explanatory label and contains no actual data so that there would be no
  173. reason to include it in a query.
  174.  
  175. 4.2.5 Other types of Editable field
  176. -----------------------------------
  177. So far we have only used fields of Unrestricted type. Clicking on “bump”
  178. icons to the left of the field type, or on the menu button to the right,
  179. lets you cycle through the various types available. These are:−
  180.  
  181. (a) Unrestricted  Accepts any printable character.
  182. (b) Alphanumeric  Accepts all letters and numerals and common punctuation.
  183. (c) Upper case    Accepts capital letters and numerals only.
  184. (d) Numeric       Accepts numerals, +, − and . (decimal point).
  185. (e) Yes/No        Accepts Y and N only.
  186. (f) Date          Accepts dates in the form dd-mm-yy or dd-mm-yyyy.
  187. (g) Time          Accepts times in the form hh:mm:ss up to a maximum
  188.                   value of 3:59:59.
  189.  
  190. When Numeric is selected, certain icons in the dialogue box which are
  191. normally shaded become available. Thus, you can specify floating-point,
  192. fixed-point or integer format by means of a group of radio buttons. You may
  193. also specify a maximum and minimum value for numbers which may be entered in
  194. these fields.
  195.  
  196. A Date field should be either 8 or 10 characters long in order to hold the
  197. date in one of the two formats specified above. The separator in these dates
  198. is, by default, a hyphen but may be changed via the Preferences window (see
  199. 14.5.1).  Note that the actual typing in of dates allows far more
  200. flexibility. You may type any non-numeric character as a separator and
  201. Powerbase will make sense of entries such as 4/5/87, duly converting it to
  202. 04-05-87 when you press Return.
  203.  
  204. A Time field (like a date) is checked for validity and (again like a date)
  205. you may be fairly flexible in how you actually type the values in. If you
  206. enter 3.45;9 it will be reformatted as 03:45:09. The colon separator may be
  207. changed via the Preferences window (see 14.5.1). Arithmetic may be performed
  208. on times held in this type of field.
  209.  
  210. For a description of the workings of Computed fields see Ch 6 (Performing
  211. Calculations).
  212.  
  213. 4.2.6 Check-box fields
  214. ----------------------
  215. These are fields whose status alternates between two values when clicked on
  216. with SELECT. Three types are defined:−
  217.  
  218. (a) Cross/tick  Displays a cross by default. A click changes it to a tick. A
  219.                 second click changes it back to a cross.
  220.  
  221. (b) Null/tick   Similar to (a), but first state is an empty box.
  222.  
  223. (c) Null/star   Similar to (b), but second state is a star.
  224.  
  225. Check-boxes provide the fastest way of entering true/false or yes/no type
  226. data. If you examine the ValStrings file inside the Powerbase directory you
  227. will find strings associated with each of these three types the latter parts
  228. of which read, respectively:−
  229.  
  230. QNo,Yes                 Q-,Yes                 Q-,*
  231.  
  232. These specify what will actually appear in a print-out when a check-box
  233. field is included in a query. You may change them if you wish, but don’t
  234. omit the initial Q (although this will not appear in the print-out) and take
  235. care not to alter the remainder of the string.
  236.  
  237. 4.2.7 External fields
  238. ---------------------
  239. External fields allow you to link Powerbase records to pieces of data of a
  240. size and type which make them unsuitable for inclusion in a Data field. Such
  241. items are sometimes called “BLOBs” (Binary Large Objects) in the PC world.
  242. The field types in this category and the types of data they “hold” are as
  243. follows:−
  244.  
  245. (a) Text        Plain text files, such as Edit creates.
  246. (b) Sprite      Sprite files, such as Paint creates.
  247. (c) Draw        Drawings such as Draw creates.
  248. (d) Text block  Plain text files, as for (a).
  249. (e) Picture     Sprite files, as for (b).
  250.  
  251. When you create a field of type Text, Sprite or Draw it appears on the
  252. record window as a button bearing a small version of the icon for Edit,
  253. Paint or Draw respectively. Files of the appropriate type may be dropped on
  254. these buttons, whereupon the file is copied into a special system of
  255. subdirectories within the database application. Unlike fields of the Data
  256. category the data doesn’t become part of the Database file within the
  257. application; the Text, Sprite or Draw file retains its identity and may be
  258. exported for editing in the appropriate application. Clicking on the button
  259. in the record window will display the file if the filer knows the
  260. whereabouts of the relevant editor (Edit, Paint or Draw).
  261.  
  262. Text block and Picture fields take this a step further by actually
  263. displaying a text or sprite file on the record window. The bounding box of
  264. the icon needs to be of suitable size to hold the text or picture. In the
  265. case of a Text block too small a box will cause the text to appear
  266. truncated. None is actually lost; it just can’t all be displayed. Too small
  267. a box for a Picture field will cause the sprite to spread beyond its
  268. boundaries. (N.B. To display the same sprite on each record, e.g. a company
  269. logo, define the field as of type Logo, not Picture.)
  270.  
  271. 4.2.8 Button fields
  272. -------------------
  273. Any or all of the control buttons on the Powerbase keypad may be made to
  274. appear on the record window itself. They have exactly the same functions as
  275. the keypad equivalents. These button fields let you build a customised
  276. database which allows the user to use only the features you want him/her to
  277. have access to since the keypad and menus can then be suppressed. There is
  278. also a group of Other buttons which have no keypad equivalent:−
  279.  
  280. •       Print  brings up the Print window for report generation.
  281.  
  282. •       Exit duplicates the action of Close database on the icon-bar menu.
  283.  
  284. •       Quit duplicates the action og Quit on the icon-bar menu.
  285.  
  286. •       Run file may have a file dropped onto it and subsequent clicks on
  287.         the button will run the file. Text files are treated as Powerbase
  288.         scripts (see Ch 12), other types of file (e.g. Obey files) have
  289.         their normal Run action. Note that these are not the same as
  290.         External fields. The file attached to an external field button
  291.         "belongs" to a specific record and every record can have a different
  292.         file. The file attached to a Run file button is the same whatever
  293.         record is being displayed.
  294.  
  295. •       Directory enables you to open a filer window by clicking on the
  296.         button. The descriptor may be used to give the name of the
  297.         associated directory and the link is established by dropping the
  298.         directory onto the button in the same way that files are linked to
  299.         fields of External type.
  300.  
  301. •       Menu allows you to associate an ordinary Data field with a pop-up
  302.         menu activated by means of a button.  Choosing a character string
  303.         from the menu enters that string into the Data field. For this to
  304.         work the field number of the  menu button must immediately follow
  305.         that of the associated Data field. The menu itself is a text file
  306.         consisting of a heading and the items which are to appear on the
  307.         menu, each on its own line. The file, whose name is the tag of the
  308.         associated Data field plus the word “menu”, is stored in the
  309.         database directory.
  310.  
  311. 4.2.9 Stamp fields
  312. ------------------
  313. Stamp fields resemble Calculated and Composite fields in that you cannot
  314. edit them; Powerbase takes care of their automatic updating. The following
  315. types are available:−
  316.  
  317. (a) Record number    Database record number.
  318.  
  319. (b) Sequence number  Unique value numbered upwards from base value set by
  320.                      user.
  321.  
  322. (c) Time             Time at which record was created.
  323.  
  324. (d) Date             Date on which record was created.
  325.  
  326. (e) Date and time    Date and time of record creation.
  327.  
  328. (f) Day              Day on which record was created (in the form Mon,
  329.                      Tue etc or day of month as 10, 24 etc).
  330.  
  331. (g) Month            Month in which record was created (as either a
  332.                      string; Jan, Feb etc or a number; 1, 2 etc).
  333.  
  334. (h) Year             Year when record was created as four-digit number,
  335.                      e.g. 1993
  336.  
  337. (i) Last altered     Records the date and time record is first created
  338.                      and updates it if the record is subsequently
  339.                      altered. Merely displaying the record does not cause
  340.                      updating.
  341.  
  342. (j) Logo             Allows a sprite to be included as a logo on  every
  343.                      record.
  344.  
  345. All such fields are “stamped” by Powerbase when a record is first entered.
  346. Note the following:−
  347.  
  348. •       When using Record or Sequence numbers make sure the Data length icon
  349.         contains a large enough value to accommodate the longest number
  350.         which will be encountered. For the other types the required field
  351.         length is already known by Powerbase and the Data length box is
  352.         therefore shaded.
  353.  
  354. •       The base value from which sequence numbers begin is entered in the
  355.         Numeric min box. When a record containing such a field is deleted
  356.         the sequence number is not normally re-used; a new record is given a
  357.         new sequence number.  This, of course, leads to gaps in the numeric
  358.         sequence and you might want to reassign the numbers so that the
  359.         sequence is continuous.  You can do so by means of Compact sequence
  360.         from the Field submenu. Before this can be used the sequence number
  361.         field must be indexed and selected as the current index.
  362.  
  363. •       Date fields may display the date in any of three formats:−
  364.  
  365.         (i)   Sun,01 Aug 1993 (called “Date stamp”)
  366.         (ii)  01-08-93 (called “Date stamp8”)
  367.         (iii) 01-08-1993 (called “Date stamp10”)
  368.  
  369. (ii) and (iii) are identical to the formats in which Powerbase displays
  370. dates of the ordinary editable-data type (see 4.2.5). The numbers refer to
  371. the field length occupied by the date stamp.  Type (j) fields require the
  372. name of the sprite to be entered as the tag of the field to be used as a
  373. logo. This means that the sprite name is limited to four characters. You may
  374. have several logo fields on your record, all the required sprites being
  375. included in a file called UsrSprites which is placed inside the database
  376. directory.
  377.  
  378. 4.3 A short-cut to a working database
  379. =====================================
  380. Immediately beneath the Design field entry on the menu is one called Default
  381. database. Choosing this is by far the fastest way of getting a database up
  382. and running. Its action is to create three files inside the application
  383. directory. These are called Form (which holds the record design), PrimaryKey
  384. and Database (which will ultimately contain the entered records). The number
  385. of records in the database is set to 100, with 25 as the amount by which
  386. this should increase when the database becomes full. The primary key is
  387. defined as the first four characters of the first writable field. The
  388. database is opened and a blank record displayed ready for data entry.  Since
  389. you can always alter such things as the database size and primary key
  390. structure later, you might wish to use these defaults while you experiment
  391. with the database.
  392.  
  393. 4.4 Specifying the database size
  394. ================================
  395. If, however, you want to set the database size yourself at this stage
  396. proceed as follows:−
  397.  
  398. (1)     Save the Form file (which contains all the field data) from the Save
  399.         box reached from the menu item. The pathname is correctly set for
  400.         saving the file inside your database application.
  401.  
  402. (2)     You will now see that the Database size choice is no longer shaded
  403.         and may be used to reach the Size window in which you specify the
  404.         number of records in the database and the increment for expanding
  405.         the database when it becomes full.
  406.  
  407. 4.5 Specifying the primary key
  408. ==============================
  409. 4.5.1 General procedure
  410. -----------------------
  411. Click MENU and choose Primary key.  This opens the Key Structure window. The
  412. primary key (or any other key) is derived from one or more record fields
  413. called key fields. Up to four key fields may be used to define a key but we
  414. will begin by using just one.  Four pieces of information need to be
  415. specified:−
  416.  
  417. (1)     Choose the field, either by clicking on the “bump” icons or choosing
  418.         from the associated pop-up menu.  The default is the first editable
  419.         field in the record.
  420.  
  421. (2)     Enter the word within the field from which characters are to be
  422.         taken to make up the key.  The default is word 1.
  423.  
  424. (3)     Enter the position within the word from which characters are to be
  425.         taken. L (default) means from start of word, R means take from end.
  426.         A number (n) means start at the nth character.
  427.  
  428. (4)     Enter the number of characters to be taken from the word. The
  429.         initially-set value is 4 but thereafter the default is the defined
  430.         field length.
  431.  
  432. After entering this information click on Create to build the database.
  433.  
  434. 4.5.2 Some illustrative examples
  435. --------------------------------
  436. Supposing our key-field contains a person’s name in the order FORENAME
  437. SURNAME. The following settings of word, position and characters would
  438. produce the keys shown from the name ALBERT HERRING
  439.  
  440.        Word  Position  Chars    Key
  441.  
  442. (a)     1       L       5       ALBER
  443. (b)     1       R       4       BERT
  444. (c)     1       2       4       LBER
  445. (d)     1       4       4       ERT       (NOTE: stops at word end)
  446. (e)     2       L       4       HERR
  447. (f)     2       R       3       ING
  448. (g)     2       3       4       RRIN
  449. (h)     0       L       5       ALBER
  450. (i)     0       L       7       ALBERTH   (NOTE: ignores word break)
  451. (j)     0       R       8       THERRING  (NOTE: ignores word break)
  452. (k)     0       4       6       ERTHER    (NOTE: ignores word break)
  453.  
  454. Take particular note of what happens if the word number is entered as 0 (or
  455. left blank).  All breaks between words are then ignored.  The field is
  456. treated as if the blanks between words had been removed leaving a single
  457. long word which is then subjected to the process specified by the position
  458. and characters icons.  When, on the other hand, the word number is 1 or
  459. greater the scanning for characters stops when the end of the word is
  460. reached so that the key might be shorter than the character length
  461. specified. Example (d) illustrates this.
  462.  
  463. 4.5.3  Using more than one field in a key
  464. -----------------------------------------
  465. Key fields should be chosen with care. An ideal key field is one whose
  466. contents would never be repeated in another record. Powerbase lets you
  467. enforce this condition if you wish (see 11.2.1). Occasional repetitions may
  468. not be serious, but a field which can have only a few “values” is usually a
  469. poor choice. A customer number or membership number is the sort of thing we
  470. are looking for but your database may not contain anything like that.  In a
  471. database of school pupils the pupil’s name would be a good choice of key,
  472. but the form teacher’s name would not, since only a small number of names
  473. would be involved, each appearing on the record of many pupils.
  474.  
  475. Suppose you decide to use a person’s name, stored surname first, in a single
  476. field whose tag is NAME, as a key. You could use the whole name but it would
  477. probably be far too long. The first four letters would be more appropriate
  478. but, as this is the start of the surname, you might get a lot of
  479. duplication. e.g. PRESTON and PRESCOTT would both have the key PRES − and
  480. this is before we even consider people whose surnames are identical. To get
  481. round this problem, Powerbase lets you construct an alphanumeric key from
  482. characters taken from up to four successive words. You will seldom need to
  483. go so far. In the present case a five-letter key made up from the first four
  484. letters of the surname and one letter of the forename would be good enough
  485. for most purposes.
  486.  
  487. Set up the Key Structure window as follows:−
  488.  
  489.             Field  Word  Position  Chars
  490.  
  491.   1st row:  NAME    1        L       4
  492.   2nd row:  NAME    2        L       1
  493.  
  494.  
  495.  
  496. This works quite well.  Smith Peter and Smith Janet would have the keys
  497. SMITP and SMITJ. Duplication can still occur, but not often enough to be a
  498. serious problem.  You might, of course, want to store surname and forename
  499. in different fields. Let’s call their tags SNAM and FNAM.
  500.  
  501. The key definition is then:−
  502.  
  503.             Field  Word  Position  Chars
  504.  
  505.   1st row:  SNAM    1        L       4
  506.   2nd row:  FNAM    1        L       1
  507.  
  508. and the keys generated will be exactly the same as they would be for the
  509. single field NAME.
  510.  
  511. There are databases where no single field is suitable for constructing the
  512. primary key.  In a database of classical music, for example, there could be
  513. a field for the composer’s name and one for the name of the work. Neither is
  514. much use individually, the former could contain many occurrences of Mozart
  515. and Beethoven and the latter many repetitions of Symphony No.5 or String
  516. Quartet in D minor.
  517.  
  518. This is the kind of situation where you might want to use two fields and
  519. four words, taking one word from the Composer field and three from the Work
  520. field using, say, 4,3,3 and 2 characters respectively from them.  The
  521. following two works then give the keys shown:−
  522.  
  523.         BEETHOVEN  Symphony No 5:  BEETSYMNO5
  524.         MOZART Piano concerto 23:  MOZAPIACON23
  525.  
  526. Note the following points in these examples:−
  527.  
  528. (a)     If a word is shorter than the number of letters assigned to it (“No”
  529.         in the first example) then the whole word is used but no padding is
  530.         inserted.
  531.  
  532. (b)     It may be necessary to omit an insignificant word (“No” in the
  533.         second example), in order to make a significant one (“23”) come in
  534.         the first four words of the combined key fields.
  535.  
  536. NOTE It is not usually sensible to build up keys derived from Numeric fields
  537. out of separate bits in this way and, indeed, Powerbase won’t allow you to
  538. do so. Numeric keys should use one key-field only, the key being the actual
  539. numeric value of the field contents.
  540.  
  541. 4.5.4 Other matters
  542. -------------------
  543. We have already noted that a word shorter than the number of characters
  544. specified is used just as it is, resulting in a short key. There might be
  545. times when you want short words padding out with spaces to give a key of
  546. full length and there is a switch to select this action in the Key Structure
  547. window.
  548.  
  549. A final factor to be decided is whether the indexing is to pay attention to
  550. the case of letters, i.e. if they are capitals or small letters By default
  551. indexing is not case-sensitive. Thus if a record has the word “Horse” as the
  552. contents of a key field and the first four letters are used as the key then
  553. the entry in the index will be “HORS” and you may search for it by entering
  554. “HORS”, “hors”, “Hors”, “hOrS” etc.
  555.  
  556. This may not be what you want. If you require indexing to be case sensitive
  557. select the switch labelled Case. Forcing to upper case as described above
  558. does not then take place − keys are inserted and strings are searched for
  559. “as is”. The field containing “Horse” will be indexed as “Hors” and only
  560. that precise combination of upper and lower case letters will successfully
  561. find it. Alphanumeric keys will be ordered according to the ASCII values* of
  562. the letters. Since lower-case letters come later in the ASCII table than
  563. upper-case ones a record containing “dog” would appear AFTER one containing
  564. “Horse”, whereas one containing “Dog” would come before “Horse”.
  565.  
  566. 4.6 Building the empty database
  567. ===============================
  568. Once you are satisfied click Create and blank Database and PrimaryKey files
  569. will be created. The record window is redrawn and you may start entering
  570. data at once.
  571.  
  572. 4.7 Renaming a database
  573. =======================
  574. Use the Rename database option on the Miscellaneous submenu to do this.  If
  575. you rename via the filer your database will lose its ‘PB’ icon and revert to
  576. the default application icon (‘APP’ with Archimedes ‘A’).